<%@ page language="java" import="java.text.*, java.util.*, com.zjut.zs.util.tools.*,com.zjut.zs.userinfo.manager.*, com.zjut.zs.userinfo.dao.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.exvalue.manager.*,com.zjut.zs.exvalue.dao.*,com.zjut.zs.cj.manager.*, com.zjut.zs.cj.dao.*,
com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.zs.xy.manager.*, com.zjut.zs.xy.dao.*,com.zjut.zs.zxlb.manager.*, com.zjut.zs.zxlb.dao.*,
com.zjut.zs.exvalue.dao.*,com.zjut.zs.coname.manager.*, com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,
com.zjut.zs.shhd.manager.*, com.zjut.zs.shhd.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>

<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
h1 {
	font-size:32px;
	font-family: "Arial","Microsoft YaHei","����","����",sans-serif;
}
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.gridtable td {
	border: 1px solid #666;
	padding: 6px;
}
table.toptable td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
table.cj {table-layout: fixed;}
table.cj td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
-->
</style>
<script type="text/javascript" src="../plugins/assets/plugins/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
function printHtml(html) {
	var bodyHtml = document.body.innerHTML;
	document.body.innerHTML = html;
	window.print();
	document.body.innerHTML = bodyHtml;
}
function onprint() {
	var html = $("#container").html();
	printHtml(html);
}
</script>

</head>
<%	

AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsCoNameManager comanager = (ZsCoNameManager) SpringContextUtil.getBean("ZsCoNameManager");
ZsExValueManager evmanager = (ZsExValueManager) SpringContextUtil.getBean("ZsExValueManager");
ZsUserinfoManager uimanager = (ZsUserinfoManager) SpringContextUtil.getBean("ZsUserinfoManager");
ZsZxlbManager zmanager = (ZsZxlbManager) SpringContextUtil.getBean("ZsZxlbManager");
ZsShhdManager smanager = (ZsShhdManager) SpringContextUtil.getBean("ZsShhdManager");
ZsCjManager cmanager = (ZsCjManager) SpringContextUtil.getBean("ZsCjManager");
ZsXyManager xmanager = (ZsXyManager) SpringContextUtil.getBean("ZsXyManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");

ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);

ZsUser user = null;
ZsExValue exValue = new ZsExValue();
ZsUserinfo userinfo = new ZsUserinfo();
ZsCj cj = new ZsCj();
ZsXy xy = new ZsXy();
ZsZxlb zxlb = new ZsZxlb();
ZsShhd shhd = new ZsShhd();

if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
	zxlb.setZsUser(umanager.getData(usId));
	shhd.setZsUser(umanager.getData(usId));
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");
	zxlb.setZsUser((ZsUser)session.getAttribute("zsUser"));	
	shhd.setZsUser((ZsUser)session.getAttribute("zsUser"));	
}
	List zlist = zmanager.getDataByInstance(1,100,null,null,zxlb).getObjects();
	List slist = smanager.getDataByInstance(1,100,null,null,shhd).getObjects();

if (user!=null) {
	exValue.setZsUser(user);	
	userinfo.setZsUser(user);
	cj.setZsUser(user);
	xy.setZsUser(user);
										
	List evlist = evmanager.getDataByInstance(1,1,null,null,exValue).getObjects();
	List uilist = uimanager.getDataByInstance(1,1,null,null,userinfo).getObjects();
	List clist = cmanager.getDataByInstance(1,1,null,null,cj).getObjects();
	List xlist = xmanager.getDataByInstance(1,1,null,null,xy).getObjects();
	
	if (evlist.size()>0) {
		exValue = (ZsExValue)evlist.get(0);
	}
	if (uilist.size()>0) {
		userinfo = (ZsUserinfo)uilist.get(0);
	}
	if (clist.size()>0) {
		cj = (ZsCj)clist.get(0);
	}
	if (xlist.size()>0) {
		xy = (ZsXy)xlist.get(0);
	}
}

String receiveno = html.getReceiveNo(user.getUsNo());
%>
<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
	<div class="place" style="margin-top:0;">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">申请表打印</a></li>
    </ul>
    </div>
    <input type="button" onclick="onprint()" value="打印" class="btn btn-primary btn-sm" style="margin:20px;"/>
<div style="margin:10px;width:400px;float:right;"><%out.print(anconfig.getSingleConfigInfoByName("申请表打印需知")); %></div>
<div id="container" class="container" style="width:100%;">
    
  		<div style="text-align:center"><h1><%=anconfig.getSingleConfigInfoByName("申请表名称") %></h1></div>
  		<table width="1000" class="toptable" style="margin:0 auto;">
    		  <tr>
		        <td>
		        <div style="width:190px;float:left;">报名编号：<%=receiveno %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column1").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column1").getCoCn() %>:
		        <%=exValue.getColumn1() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column2").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column2").getCoCn() %>:
		        <%=exValue.getColumn2() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column3").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column3").getCoCn() %>:
		        <%=exValue.getColumn3() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column4").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column4").getCoCn() %>:
		        <%=exValue.getColumn4() %></div>
		        </td>
		      </tr>
   		</table>
   		<table width="1000" class="gridtable" style="margin-bottom:0px;margin:0 auto;">
   		  <tr>
   		    <td>姓　名：</td>
   		    <td><%=user.getUsName() %></td>
   		    <td>性　别：</td>
   		    <td><%=userinfo.getInSex() %></td>
   		    <td>出生日期：</td>
   		    <td><%=userinfo.getInBirthday() %></td>
   		    <td rowspan="10" align="center" valign="top"><img name="" src="../<%=userinfo.getInPhoto()%>" width="180" height="240" alt="" /></td>
          </tr>
   		  <tr>
   		    <td>民　族：</td>
   		    <td><%=userinfo.getInMz() %></td>
   		    <td>政治面貌：</td>
   		    <td><%=userinfo.getInZz() %></td>
   		    <td>考生类别：</td>
   		    <td><%=userinfo.getInBkType() %></td>
	      </tr>
   		  <tr>
   		    <td>身份证号：</td>
   		    <td colspan="3"><%=user.getUsIdcard() %></td>
   		    <td>会考证号：</td>
   		    <td><%=userinfo.getInBkCode()%></td>
	      </tr>
   		  <tr>
   		    <td>通讯地址：</td>
   		    <td colspan="3"><%=userinfo.getInTxdzSf() %><%=userinfo.getInTxdzCs() %><%=userinfo.getInTxdzDq() %><%=userinfo.getInTxdzXxdz() %></td>
   		    <td>邮编：</td>
   		    <td><%=userinfo.getInTxdzPost() %></td>
	      </tr>
   		  <tr>
   		    <td>联系电话：</td>
   		    <td><%=userinfo.getInCall() %></td>
   		    <td>电子邮箱：</td>
			<td><%=user.getUsEmail() %></td>
   		    <td>手机：</td>
   		    <td><%=user.getUsMobile() %></td>
	      </tr>
	      <tr>
   		    <td>家庭成员</td>
   		    <td>姓名</td>
			<td>文化程度</td>
   		    <td>工作单位</td>
   		    <td>职务</td>
   		    <td>联系电话</td>
	      </tr>
	      <tr>
   		    <td>父亲<br>(或其他监护人)</td>
   		    <td><%=userinfo.getInFaName() %></td>
			<td><%=userinfo.getInFaWhcd() %></td>
   		    <td><%=userinfo.getInFaGzdw() %></td>
   		    <td><%=userinfo.getInFaZw() %></td>
   		    <td><%=userinfo.getInFaLxdh() %></td>
	      </tr>
	      <tr>
   		    <td>母亲<br>(或其他监护人)</td>
   		    <td><%=userinfo.getInMaName() %></td>
			<td><%=userinfo.getInMaWhcd() %></td>
   		    <td><%=userinfo.getInMaGzdw() %></td>
   		    <td><%=userinfo.getInMaZw() %></td>
   		    <td><%=userinfo.getInMaLxdh() %></td>
	      </tr>
	      <tr>
   		    <td>毕业中学：</td>
   		    <td><%=userinfo.getInZxName() %></td>
			<td>中学地址：</td>
   		    <td><%=userinfo.getInZxDz() %></td>
    		    <td>邮政编码：</td>
    		    <td><%=userinfo.getInZxPost() %></td>
	      </tr>
	      <tr>
   		    <td>中学联系人：</td>
   		    <td><%=userinfo.getInZxLxr() %></td>
			<td>中学联系电话：</td>
   		    <td><%=userinfo.getInZxCall() %></td>
   		    <td>中学传真：</td>
   		    <td><%=userinfo.getInZxFox() %></td>
	      </tr>
	      </table>
	      <%if(Status.ON.getStatus().equals(school.getScCjActive())){ %>
	      <table width="1000" class="cj" style="margin-top:0px;margin-bottom:0px;margin:0 auto;">
	      <tr>
   		    <td width="100">各科成绩</td>
   		    <td>语文</td>
			<td>数学</td>
   		    <td>历史</td>
   		    <td>地理</td>
   		    <td>外语</td>
   		    <td>物理</td>
   		    <td>化学</td>
   		    <td>生物</td>
   		    <td>思想<br>
	        政治</td>
   		    <td>信息<br>
	        技术</td>
   		    <td width="110">年级学习<br>
成绩名次/总人数</td>
          </tr>
	      <tr>
	        <td>高一（上）期末</td>
	        <td><%=cj.getCjYw1() %></td>
	        <td><%=cj.getCjSx1() %></td>
	        <td><%=cj.getCjLs1() %></td>
	        <td><%=cj.getCjDl1() %></td>
	        <td><%=cj.getCjWy1() %></td>
	        <td><%=cj.getCjWl1() %></td>
	        <td><%=cj.getCjHx1() %></td>
	        <td><%=cj.getCjSw1() %></td>
	        <td><%=cj.getCjZz1() %></td>
	        <td><%=cj.getCjXx1() %></td>
	        <td><%=cj.getCjNj1()%></td>
	        </tr>
	      <tr>
	        <td>高一（下）期末</td>
	        <td><%=cj.getCjYw2() %></td>
	        <td><%=cj.getCjSx2() %></td>
	        <td><%=cj.getCjLs2() %></td>
	        <td><%=cj.getCjDl2() %></td>
	        <td><%=cj.getCjWy2() %></td>
	        <td><%=cj.getCjWl2() %></td>
	        <td><%=cj.getCjHx2() %></td>
	        <td><%=cj.getCjSw2() %></td>
	        <td><%=cj.getCjZz2() %></td>
	        <td><%=cj.getCjXx2() %></td>
	        <td><%=cj.getCjNj2()%></td>
	        </tr>
	      <tr>
	        <td>高二（上）期末</td>
	        <td><%=cj.getCjYw3() %></td>
	        <td><%=cj.getCjSx3() %></td>
	        <td><%=cj.getCjLs3() %></td>
	        <td><%=cj.getCjDl3() %></td>
	        <td><%=cj.getCjWy3() %></td>
	        <td><%=cj.getCjWl3() %></td>
	        <td><%=cj.getCjHx3() %></td>
	        <td><%=cj.getCjSw3() %></td>
	        <td><%=cj.getCjZz3() %></td>
	        <td><%=cj.getCjXx3() %></td>
	        <td><%=cj.getCjNj3()%></td>
	        </tr>
	      <tr>
	        <td>高二（下）期末</td>
	        <td><%=cj.getCjYw4() %></td>
	        <td><%=cj.getCjSx4() %></td>
	        <td><%=cj.getCjLs4() %></td>
	        <td><%=cj.getCjDl4() %></td>
	        <td><%=cj.getCjWy4() %></td>
	        <td><%=cj.getCjWl4() %></td>
	        <td><%=cj.getCjHx4() %></td>
	        <td><%=cj.getCjSw4() %></td>
	        <td><%=cj.getCjZz4() %></td>
	        <td><%=cj.getCjXx4() %></td>
	        <td><%=cj.getCjNj4()%></td>
	        </tr>
	      <tr>
	        <td>高三（上）期末</td>
	        <td><%=cj.getCjYw5() %></td>
	        <td><%=cj.getCjSx5() %></td>
	        <td><%=cj.getCjLs5() %></td>
	        <td><%=cj.getCjDl5() %></td>
	        <td><%=cj.getCjWy5() %></td>
	        <td><%=cj.getCjWl5() %></td>
	        <td><%=cj.getCjHx5() %></td>
	        <td><%=cj.getCjSw5() %></td>
	        <td><%=cj.getCjZz5() %></td>
	        <td><%=cj.getCjXx5() %></td>
	        <td><%=cj.getCjNj5()%></td>
	        </tr>
          </table>
          <%} %>
          <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
          <tr>
            <td colspan="8">选考成绩</td>
            </tr>
          <tr>
            <td >科目</td>
            <td >历史</td>
            <td >地理</td>
            <td >技术</td>
            <td >物理</td>
            <td >化学</td>
            <td >政治</td>
            <td >生物</td>
            </tr>
          <tr>
            <td>选考</td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("历史"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("地理"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("技术"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("物理"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("化学"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("政治"))out.print("是"); %></td>
            <td><%if(xy.getXyXkIs()!=null&&xy.getXyXkIs().contains("生物"))out.print("是"); %></td>
            </tr>
          <tr>
            <td>成绩</td>
            <td><%=xy.getXyXkLs() %></td>
            <td><%=xy.getXyXkDl() %></td>
            <td><%=xy.getXyXkJs() %></td>
            <td><%=xy.getXyXkWl() %></td>
            <td><%=xy.getXyXkHx() %></td>
            <td><%=xy.getXyXkZz() %></td>
            <td><%=xy.getXyXkSw() %></td>
            </tr>
          </table>
          <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
          <tr>
            <td colspan="13">学业水平测试成绩</td>
            </tr>
          <tr>
            <td width="59" >科目</td>
            <td width="60" >历史</td>
            <td width="60" >地理</td>
            <td width="60" >英语</td>
            <td width="60" >物理</td>
            <td width="60" >化学</td>
            <td width="92" >思想政治</td>
            <td width="60" >生物</td>
            <td width="92" >技术</td>
            <td width="60" >语文</td>
            <td width="60" >数学</td>
            <td width="92" >技术</td>
            <td width="103" >综合素质</td>
          </tr>
          <tr>
            <td>成绩</td>
            <td><%=xy.getXyLs() %></td>
            <td><%=xy.getXyDl() %></td>
            
            <td><%=xy.getXyWy() %></td>
            <td><%=xy.getXyWl() %></td>
            <td><%=xy.getXyHx() %></td>
            <td><%=xy.getXyZz() %></td>
            <td><%=xy.getXySw() %></td>
            <td><%=xy.getXyJs() %></td>
            <td><%=xy.getXyYw() %></td>
            <td><%=xy.getXySx() %></td>
            <td><%=xy.getXyJs() %></td>
            <td><%=xy.getXyZxzh() %></td>
          </tr>
  </table>
          
          
          <table width="1000" class="gridtable" style="margin-bottom:10px;margin:0 auto;">
          <%if(Status.ON.getStatus().equals(school.getScZxlbActive())){ %>
	      <tr>
   		    <td colspan="7">专项条件（严格按招生简章中的专项条件填写）</td>
          </tr>          
	      <tr>
   		    <td width="100">专项类别</td>
   		    <td>获奖时间</td>
   		    <td colspan="2">名称</td>
   		    <td>奖项级别</td>
   		    <td>等级</td>
   		    <td>颁奖单位或相应等级证书</td>
          </tr>
	      <%
   		       for (int i=0; i<zlist.size(); i++){
		    	zxlb = (ZsZxlb)zlist.get(i);
   		       %>
	      <tr>
   		    <td><%=zxlb.getZxType() %></td>
	    	<td><%=zxlb.getZxDate() %></td>
	    	<td colspan="2"><%=zxlb.getZxName() %></td>
	    	<td><%=zxlb.getZxJb() %></td>
	    	<td><%=zxlb.getZxDj() %></td>
	    	<td><%=zxlb.getZxOrg() %></td>
          </tr>
	      <%} %>
	      <%} %>
	      <%if(Status.ON.getStatus().equals(school.getScShhdActive())){ %>
	      <tr>
   		    <td colspan="7">高中阶段参与的社会工作和课外活动（含活动时间、受过何种奖励、本人在活动中的职务或者职责）</td>
          </tr>
	      <tr>
   		    <td colspan="2">活动名称</td>
   		    <td>担任角色</td>
   		    <td colspan="2">活动时间</td>
   		    <td colspan="2">组织单位</td>
          </tr>
	      <%
   		       for (int i=0; i<slist.size(); i++){
		    	shhd = (ZsShhd)slist.get(i);
   		       %>
	      <tr>
   		    <td colspan="2"><%=shhd.getHdName() %></td>
	    	<td><%=shhd.getHdJs() %></td>
	    	<td colspan="2"><%=shhd.getHdDateStart() %>至<%=shhd.getHdDateEnd() %></td>
	    	<td colspan="2"><%=shhd.getHdOrg() %></td>
          </tr>
	      <%} %>
	      <%} %>
	      <tr>
            <td>以上内容<br>是否属实</td>
            <td>本人确保提供的材料真实有效</td>
            <td>学生本人签名</td>
            <td colspan="2">&nbsp;</td>
            <td>填表日期</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td height="80"><br>中学意见</td>
            <td height="80" colspan="6"></td>
          </tr>
          <tr>
            <td height="100" colspan="7" align="left" valign="bottom">学校公章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 校长签名<br>
            <br><br><div style="text-align:right;">年&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 月&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 日</div>            </p></td>
          </tr>
      </table>
      
      
<div style="width:1000px;margin:0 auto;"><%out.print(anconfig.getSingleConfigInfoByName("申请表填写需知")); %></div>
   </div>

<script>
$("#ewcode1").attr("src","http://qr.topscan.com/api.php?text=<%=anconfig.getSingleConfigInfoByName("网站域名") %>/admin/zsApplyViewStatus.jsp?usId=<%=user.getUsId()%>&localStatusType=single"); 
$("#ewcode2").attr("src","http://qr.topscan.com/api.php?text=<%=anconfig.getSingleConfigInfoByName("网站域名") %>/admin/zsApplyViewEdit.jsp?usId=<%=user.getUsId()%>"); 

</script>
</body>
</html>
